﻿namespace EyeOpen.Data.Nibernate.Mapping
{
    using EyeOpen.Domain;

    public class TagMap : UniqueEntityMap<Tag>
    {
        protected TagMap()
        {
            Map(x => x.Name)
                .WithLengthOf(200)
                .Not.Nullable();

            References(x => x.Parent)
                .ColumnName("ParentId")
                .NotFound.Exception();
        }
    }
}
